@import url('https://fonts.googleapis.com/css2?family=Cal+Sans&family=Protest+Strike&display=swap');
@import url('https://fonts.googleapis.com/css2?family=PT+Serif+Caption:ital@0;1&display=swap');

header{
    h1{
        border: 0px;
        background: linear-gradient(rgba(255, 251, 254, 0.62), rgba(255, 251, 254, 0.9)), url(../GIFFILES/pigeonBakery.gif) !important;
        background-size: 12em !important;
        margin: 0em 0em 1em 0em;
        padding: 1.4em 1em 1.1em 1em;
        box-shadow: var(--shadow-md);
    }
}


/* ================================================
   PAGE SPLIT - category rail down the left,
   the menu itself down the right.
   ================================================ */

#menuList{
    display: grid;
    grid-template-columns: minmax(0, 30%) minmax(0, 1fr);
    gap: 2em;
    align-items: start;

    width: min(76em, calc(100% - 3em));
    margin: 0em auto 2em auto;
    padding-bottom: 0em;
}

.itemTypeMenu{
    grid-column: 1;
    /* -1 only reaches the end of the explicit grid, and there are no
       explicit rows here - so span past every section instead. */
    grid-row: 1 / span 50;

    position: sticky;
    top: 6em;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3em;

    max-height: calc(100vh - 8em);
    overflow-y: auto;
    overflow-x: hidden;

    padding: 0.9em;
    background-color: white;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
}

.itemSection{
    grid-column: 2;
    width: auto;
    margin: 0em 0em 2em 0em;
}


/* ================================================
   CATEGORY BUTTON - round icon, label alongside
   ================================================ */

.itemTypeButton{
    flex: 0 0 auto;        /* Prevent shrinking/growing, keep fixed width */
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85em;

    width: 100%;
    margin: 0em;
    padding: 0.4em 1em 0.4em 0.4em;

    font-family: 'Cal Sans', Arial, Helvetica, sans-serif;
    font-size: 0.95em;
    line-height: 1.25;
    letter-spacing: 0.01em;
    text-align: left;
    text-shadow: none;
    color: var(--ink);

    background-color: transparent;
    border-radius: var(--r-pill);
    box-shadow: none;
    transition: background-color var(--med) var(--ease),
                transform var(--med) var(--ease),
                color var(--med) var(--ease);
}

/* the icon itself - each one gets its picture from the id rules below */
.itemTypeButton::before{
    content: "";
    flex: 0 0 auto;
    width: 3.1em;
    height: 3.1em;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: var(--shadow-sm);
    transition: transform var(--med) var(--ease),
                box-shadow var(--med) var(--ease);
}

.itemTypeButton:hover{
    color: var(--purple-deep);
    background-color: var(--purple-soft);
    transform: translateX(5px);
}

.itemTypeButton:hover::before{
    transform: scale(1.1) rotate(-6deg);
    box-shadow: var(--shadow-md);
}

.itemTypeButton:active{
    transform: translateX(2px) scale(0.99);
}


/* menuScroll.js marks whichever section you are looking at */
.itemTypeButton.activeCategory{
    color: var(--purple-deep);
    background-color: var(--purple-soft);
    font-weight: bold;
}

.itemTypeButton.activeCategory::before{
    box-shadow: 0 0 0 3px var(--pink), var(--shadow-md);
}


/* ================================================
   MENU BODY
   ================================================ */

h1{
    padding: 0.6em 0.5em 0.5em 0.5em;
    margin: 0em;
    border-top: 1px solid var(--line);
}

h2{
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    padding: 1.2em 0.5em 0.5em 0.5em;
    color: var(--ink-faint);
    letter-spacing: 0.1em;
    text-align: center;
}

h3{
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

.priceText{
    font-family: 'PT Serif Caption', serif;
    color: var(--purple-deep);
    font-weight: bold;
    white-space: nowrap;
}

.descriptionText{
    padding: 1em 0em;
}

.itemCard{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75em;
    padding: 1em 1.25em;
    margin: 0em 0em 0.6em 0em;

    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--med) var(--ease),
                box-shadow var(--med) var(--ease),
                border-color var(--med) var(--ease);
    p{
        color: var(--ink-soft);
    }
    img{
        flex: 1;
        max-width: 100%;
        height: 20vh;
        border-radius: var(--r-sm);
        box-shadow: var(--shadow-sm);
        object-fit:cover;
        display: block;
    }
}

.itemCard:hover{
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(139, 79, 209, 0.3);
}

/* flavours read as a row of little chips rather than a price list */
.flavourList{
    background: linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.92)), url(../GIFFILES/dazzlingBakes.gif) !important;
    background-size: 12em !important;
    margin: 0em 0em 0.6em 0em !important;
    justify-content: center;
    gap: 0.5em;
    border-radius: var(--r-lg);
    h4{
        padding: 0.5em 1em;
        font-size: 0.9rem;
        color: var(--purple-deep);
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid var(--line);
        border-radius: var(--r-pill);
    }
}

.flavourList:hover{
    transform: none;
}

.customNote{
    display: block;
    width: min(76em, calc(100% - 3em));
    margin: 0em auto;
    color: var(--purple-deep);
    text-shadow: none;
    text-transform: none;
    font-size: 0.95em;
    text-align: center;
    padding: 1em;
}

.briefMenu{
    margin: 1em auto 2em auto;
    width: min(56em, calc(100% - 2em));
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75em;
    padding: 0em 1em;
    a{
        padding: 0.8em 1.4em;
        background-color: rgba(255, 255, 255, 0.75);
        border: 1px solid var(--line);
        border-radius: var(--r-pill);
        box-shadow: var(--shadow-sm);
        transition: transform var(--med) var(--ease),
                    box-shadow var(--med) var(--ease),
                    background-color var(--med) var(--ease),
                    color var(--med) var(--ease);
    }
    a:hover{
        background-color: var(--ink);
        color: white;
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }
}




/*BUTTONS*/
#cupcakeButton::before{
    background-image: url(../PRODUCTIMGS/cake.gif);
}

#cakesicleButton::before{
    background-image: url(../PRODUCTIMGS/cakesicle.gif);
}

#cheesecakeButton::before{
    background-image: url(../PRODUCTIMGS/cheesecake.gif);
}

#chocstrawButton::before{
    background-image: url(../PRODUCTIMGS/choclatestrawberry.gif);
}

#cakeButton::before{
    background-image: url(../PRODUCTIMGS/cake.gif);
}

#bentoButton::before{
    background-image: url(../PRODUCTIMGS/bento.gif);
}

#cakepopButton::before{
    background-image: url(../PRODUCTIMGS/cakepop.gif);
}

#brownieButton::before{
    background-image: url(../PRODUCTIMGS/brownie.gif);
}

#milkcakeButton::before{
    background-image: url(../PRODUCTIMGS/milkcake.gif);
}

@media (max-width: 768px) {
    header{
        h1{
            border: 0px;
            background: linear-gradient(rgba(255, 251, 254, 0.62), rgba(255, 251, 254, 0.9)), url(../GIFFILES/pigeonBakery.gif) !important;
            background-size: 8em !important;
            margin: 0em;
            padding: 1.5em 1em;
            box-shadow: var(--shadow-md);
        }
    }

    h1{
        margin: 0em;
        padding: 0.8em 0.5em 0.6em 0.5em;
        border-top: 1px solid var(--line);
    }

    h2{
        padding: 1em 0.5em 0.5em 0.5em;
    }

    /* back to a single column, with the rail floating over the bottom */
    #menuList{
        display: block;
        width: auto;
        margin: 0em;
        padding-bottom: 7.5em;
    }

    .itemSection{
        width: calc(100% - 2em);
        margin: 0em auto 2em auto;
    }

    /* docked to the bottom edge like an app tab bar, rather than
       floating in the middle of the page */
    .itemTypeMenu{
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        height: auto;
        max-height: none;

        flex-direction: row;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0em;
        padding: 0.4em 0.3em calc(0.4em + env(safe-area-inset-bottom, 0px)) 0.3em;

        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        scrollbar-width: none;

        /* only the top edge keeps the rainbow, so it reads as a bar */
        border-width: 0.2em 0em 0em 0em;
        border-radius: 0em;
        box-shadow: 0 -6px 20px rgba(34, 22, 48, 0.16);
    }

    .itemTypeMenu::-webkit-scrollbar{
        display: none;
    }

    .itemTypeButton{
        flex-direction: column;
        justify-content: flex-start;
        gap: 0.25em;
        scroll-snap-align: center;

        width: 4.3rem;
        padding: 0.45em 0.1em 0.35em 0.1em;

        font-size: 0.55rem;
        line-height: 1.15;
        text-align: center;
        border-radius: var(--r-md);
    }

    .itemTypeButton::before{
        width: 2.5rem;
        height: 2.5rem;
    }

    .itemTypeButton.activeCategory{
        background-color: var(--purple-soft);
    }

    .itemTypeButton.activeCategory::before{
        box-shadow: 0 0 0 2.5px var(--pink), var(--shadow-sm);
    }

    .itemTypeButton:hover{
        transform: none;
        background-color: transparent;
    }

    .itemTypeButton:hover::before{
        transform: scale(1.06);
    }

    .customNote{
        width: calc(100% - 2em);
    }

    .itemCard{
        padding: 0.9em 1em;
        text-align: left;
        h3{
            text-align: left;
            padding: 0em;
        }

        img{
            max-height: 5em;
            width: 90%;
            object-fit: cover;
        }
    }

    .flavourList{
        h4{
            font-size: 0.8rem;
            padding: 0.45em 0.85em;
        }
    }

    /* the docked rail sits over the footer too */
    footer{
        padding-bottom: 6em;
    }

    .briefMenu{
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5em;
        padding: 0em 1em 1.5em 1em;
        width: auto;
        a{
            padding: 0.75em 1em;
        }
    }
}
